package com.fivestar.finance.app.bean.resp;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;

import java.io.Serializable;

/**
 * 简要描述
 *
 * @author Derek.Kidd
 * @version V1.0.0
 * @date 2016-04-18 14:49
 */
@Entity
public class UserResponse implements Serializable, Parcelable {


    /**
     * 用户id
     */
    @Id
    String userId;

    /**
     * 认证ID
     */
    String tokenId;
    /**
     *  名称
     */
    String name;

    /**
     * 1：男 0 女
     */
    int sex;
    /**
     * 手机号
     */
    String mobile;

    /**
     * 头像照片
     */
    String portraitPicUrl;

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getSex() {
        return sex;
    }

    public void setSex(int sex) {
        this.sex = sex;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }


    public String getTokenId() {
        return tokenId;
    }

    public void setTokenId(String tokenId) {
        this.tokenId = tokenId;
    }


    public String getPortraitPicUrl() {
        return portraitPicUrl;
    }

    public void setPortraitPicUrl(String portraitPicUrl) {
        this.portraitPicUrl = portraitPicUrl;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(this.userId);
        dest.writeString(this.tokenId);
        dest.writeString(this.name);
        dest.writeInt(this.sex);
        dest.writeString(this.mobile);
        dest.writeString(this.portraitPicUrl);
    }

    public UserResponse() {
    }

    protected UserResponse(Parcel in) {
        this.userId = in.readString();
        this.tokenId = in.readString();
        this.name = in.readString();
        this.sex = in.readInt();
        this.mobile = in.readString();
        this.portraitPicUrl = in.readString();
    }

    @Generated(hash = 1910516421)
    public UserResponse(String userId, String tokenId, String name, int sex, String mobile,
            String portraitPicUrl) {
        this.userId = userId;
        this.tokenId = tokenId;
        this.name = name;
        this.sex = sex;
        this.mobile = mobile;
        this.portraitPicUrl = portraitPicUrl;
    }

    public static final Creator<UserResponse> CREATOR = new Creator<UserResponse>() {
        @Override
        public UserResponse createFromParcel(Parcel source) {
            return new UserResponse(source);
        }

        @Override
        public UserResponse[] newArray(int size) {
            return new UserResponse[size];
        }
    };

    @Override
    public String toString() {
        return "UserResponse{" +
                "userId='" + userId + '\'' +
                ", tokenId='" + tokenId + '\'' +
                ", name='" + name + '\'' +
                ", sex=" + sex +
                ", mobile='" + mobile + '\'' +
                ", portraitPicUrl='" + portraitPicUrl + '\'' +
                '}';
    }
}
